
import { ModalForm, ProFormDigit, ProFormRadio } from '@ant-design/pro-components';
import { Form } from 'antd';

export default function MouseClickDialog({children, onFinish}) {
  const [form] = Form.useForm();
  return (
    <ModalForm
      title="新建表单"
      trigger={children}
      form={form}
      autoFocusFirstInput
      modalProps={{
        destroyOnClose: true,
      }}
      submitTimeout={2000}
      onFinish={values => {
        onFinish(values)
        return true
      }}
    >
      <ProFormRadio.Group
        name="mouse_key"
        label="鼠标按键"
        initialValue={"left"}
        options={[
          {label: '左键', value: "left"},
          {label: '右键', value: "right"},
        ]}
      />
      <ProFormDigit
        name="interval"
        label="间隔"
        initialValue={1}
      />
      
      
    </ModalForm>
  )
}